#include<iostream>
#include<cstring>

using namespace std;

int main() {
    char a[10000], b[1000];
    while (cin >> a >> b) {
        int cnt = 0;
        char *pos = a;
        while ((pos = strstr(pos, b)) != NULL) {
            pos += strlen(b);
            ++cnt;
        }
        cout << cnt << endl;
    }
    return 0;
}